import request from "~/util/request";
const api_name = '/api/hosp/hospital'

export default {
  getPageList(page,limit,searchObj){
    return request({
      url:`${api_name}/getHospitalPage/${page}/${limit}`,
      method:'get',
      params:searchObj
    })
  },
  getByHosname(hosname){
    return request({
      url:`${api_name}/findByHosname/${hosname}`,
      method:'get'
    })
  },
  show(hoscode){
    return request({
      url:`${api_name}/show/${hoscode}`,
      method:'get'
    })
  },
  findDepartment(hoscode){
    return request({
      url: `${api_name}/findDepartment/${hoscode}`,
      method:'get'
    })
  },
  //获取可预约的排班
  getBookingScheduleRule(page,limit,hoscode,depcode){
    return request({
      url:`${api_name}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method:'get'
    })
  },
  //获取排班数据
  findScheduleList(hoscode,depcode,workDate){
    return request({
      url:`${api_name}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
      method:'get'
    })
  },
  getSchedule(id){
    return request({
      url:`${api_name}/auth/getScheduleById/${id}`,
      method:'get'
    })
  }

}
